package com.ruitu.mall_98_1.search;

import android.os.Bundle;

import com.ruitu.mall_98_1.R;
import com.ruitu.mall_98_1.product.activity.ProductListBySearchActivity;
import com.ruitu.router_module.bean.product.SearchData;

//商品搜索
public class SearchProFragment extends SearchBaseFragment {

    public static SearchProFragment newInstance(SearchData searchData) {
        SearchProFragment fragment = new SearchProFragment();
        Bundle args = new Bundle();
        args.putSerializable("searchData", searchData);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected int getContentViewId() {
        return R.layout.fragment_search_pro;
    }

    @Override
    protected String getSearchType() {
        return "0";
    }

    @Override//开始搜索,跳转到商品页面,因为牵扯到分页问题
    protected void executeSearch() {
        Bundle bundle = new Bundle();
        bundle.putSerializable("condition", condition);
        startActivity(ProductListBySearchActivity.class, bundle);
    }

    //下面是点击热搜关键词直接搜索商品:只搜索关键词,其他区任何都多条件都不需要考虑
}
